<template>
  <div class="optional-demo">
    <div class="page-content">
      <section class="desc">{{ desc }}</section>
      <main class="main-content">
        <div class="options main-content-item">
          <div class="title">Options</div>
          <slot name="options"></slot>
        </div>
        <div class="demo main-content-item">
          <div class="title">Demo</div>
          <slot name="demo"></slot>
        </div>
        <div class="methods main-content-item">
          <div class="title">Methods</div>
          <slot name="methods"></slot>
        </div>
      </main>
    </div>
  </div>
</template>

<script>
export default {
  name: 'OptionalDemo',
  props: {
    desc: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss">
.optional-demo {
  .page-content {
    display: flex;
    flex-direction: column;
    @media screen and (max-width: 768px) {
      padding: 0 3vw;
    }
    padding: 1vw 5vw;
    .desc {
      margin: 1vw 0 3vw;
    }
  }
  .main-content {
    display: flex;
    flex-wrap: wrap;
    min-height: 50vh;
    justify-content: space-between;
    .main-content-item {
      @media screen and (min-width: 768px) {
        flex: 0 1 25%;
      }
      @media screen and (max-width: 768px) {
        flex: 0 1 100%;
      }
      margin-bottom: 3vw;
      height: 100%;
    }
    .title {
      padding: 15px 5px;
      margin-bottom: 25px;
      font-size: 24px;
      font-weight: bold;
      border-bottom: 1px solid #cccccc;
    }
    .options {
    }
    .demo {
      @media screen and (min-width: 768px) {
        flex: 0 1 30%;
      }
    }
    .methods {
    }
  }
  .group {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    .sub {
      &:last-child {
        border-bottom: none;
      }
    }
  }
}
</style>
